package kz.pompei.ifacer.model.widgets;

import java.io.PrintStream;
import java.util.UUID;

public class WidgetForm extends WidgetRect {
  public String title = "Форма";
  
  @Override
  protected void printFields(int offset, PrintStream out) {
    super.printFields(offset, out);
    String s = space(offset);
    out.println(s + "<title><![CDATA[" + title + "]]></title>");
  }
  
  public WidgetForm(UUID uuid) {
    super(uuid);
  }
  
  public WidgetForm() {}
  
  @Override
  public Widget copy() {
    WidgetForm ret = new WidgetForm(uuid);
    assignTo(ret);
    return ret;
  }
  
  @Override
  public void assignTo(Widget widget) {
    checkWidget(widget, getClass());
    super.assignTo(widget);
    WidgetForm w = (WidgetForm)widget;
    w.title = title;
  }
}
